from cProfile import label
import pandas
import matplotlib.pyplot as plt

'''
TEST solution to lambda2 ACCRUACY 随着 收敛门槛的变化
'''
# df = pandas.read_csv('/home/up/workspaces/ws_2022/src/swarm_control/csv/output_1.csv')
# plot_x = df.iloc[:, 0]
# plot_acc = df.iloc[:, 1]
# plot_time = df.iloc[:, 2]
# plt.rc('font',family='Times New Roman')
# fig, ax1 = plt.subplots()
# ax1.plot(plot_x, plot_acc, "b",label='Error')
# ax1.set_xlabel('Convergence Criteria', fontdict={'family': 'Times New Roman', 'size': 18})
# ax1.set_ylabel('Error', fontdict={'family': 'Times New Roman', 'size': 18})
# plt.xscale('log')
# plt.xticks(fontproperties='Times New Roman', size=16)
# plt.yticks(fontproperties='Times New Roman', size=16)
# ax2=ax1.twinx()
# ax2.plot(plot_x,plot_time,'r',label='Time')
# ax2.set_ylabel('Time', fontdict={'family': 'Times New Roman', 'size': 18})
# plt.yticks(fontproperties='Times New Roman', size=16)
# fig.legend(loc="upper center",bbox_to_anchor=(0.55, 0.87),prop={'size': 18})
# plt.show()
